package com.lzw.mapper.superAdmin;

import com.lzw.pojo.ProblemMedicine;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ProblemMedicineManageMapper {
    List<ProblemMedicine> list(@Param("reportedDate") LocalDate reportedDate, @Param("medicine") String medicine);

    void delete(@Param("ids") List<Integer> ids);

    @Insert("INSERT INTO pharmacymanagement.problemmedicines(medicine, issue_description,reported_date) VALUES (#{medicine}, #{issueDescription}, #{reportedDate})")
    void add(ProblemMedicine problemMedicine);

    void update(ProblemMedicine problemMedicine);
}
